const arr = [1, 3, 4, 2, NaN];
if (arr.indexOf(3) >= 0) {
    console.log(true)
}
if (arr.includes(3)) {
    console.log(true);
}
console.log(arr.includes(NaN));
console.log(Math.pow(3, 3));//3*3*3 == 3 ** 3
console.log(3 ** 3);//3*3*3
console.log("----------分割线-------1-----")
// Object.values()
const cars = {BMW: 3, Tesla: 2, Toyata: 1}
const vals = Object.keys(cars).map(key => cars[key]);
// const values = Object.values(cars);
console.log(vals);
console.log(Object.keys(cars).map(key => cars[key]));
console.log("----------分割线--------2----");
Object.keys(cars).forEach(key => {
    console.log(`key:${key} value:${cars[key]}`)
})
for (let key of Object.entries(cars)) {
    console.log(`key:${key[0]} value:${key[1]}`)
}
const map1 = new Map();
Object.keys(cars).forEach(key => {
    map1.set(key, cars[key])
})
console.log(`map1=>${map1.get('BMW')}`)
console.log("----------分割线--------3----");
console.log('5'.padStart(10)); // '          5'
console.log('5'.padStart(10, '=*')); //'=*=*=*=*=5'
console.log('5'.padEnd(10)); // '5
console.log('5'.padEnd(10, '=*')); //'5=*=*=*=*='


